import request from '../utils/request'
import requestexcel from '../utils/request-excel'

export function findUserList(current,size,userVO) {
  return request({
      url: '/user/findUserList',
      method: 'POST',
      params: {
          current,
          size
      },
      data: userVO
  })
}

/**
 * 登录
 * @param {用户名}} username 
 * @param {密码} password 
 * @returns 
 */
export function login(username,password,verifyCode) {
  return request({
      url: '/user/login',
      method: 'POST',
      params: {
          username,
          password,
          verifyCode
      }
  })
}

/**
 * 导出用户Excel
 * @param userVO
 */
export function exportUserInfo(userVO) {
  return requestexcel({
    url: '/user/export',
    method: 'post',
    data: userVO,
    responseType: "blob"
  })
} 

/**
 * 删除历史头像
 * @param {文件名称} file 
 * @returns 
 */
export function deleteImgFile(file) {
  return requestexcel({
    url: '/oss/deleteImgFile',
    method: 'post',
    params: {
      file
    }
  })
}